<template>
  <v-overlay v-if="isShow" ref="overlay">
    <v-sheet
      color="thirdary"
      :width="$vuetify.breakpoint.mdAndUp ? 500 : 300"
      class="rounded-lg overflow-hidden"
    >
      <v-sheet
        color="primary"
        width="100%"
        height="80"
        class="d-flex justify-center align-center"
      >
        <span class="text-h5"> {{ headText }} </span>
        <span
          class="iconfont p-absolute right top mr-6 mt-6 cur-point"
          style="font-size: 1.5rem"
          @click="isShow = false"
          >&#xe639;</span
        >
      </v-sheet>
      <v-sheet>
        <slot></slot>
      </v-sheet>
    </v-sheet>
  </v-overlay>
</template>



<script>
import eventBus from "../../eventBus/eventBus";
export default {
  props: {
    headText: String,
    eventString: String,
  },
  data() {
    return {
      isShow: false,
    };
  },
  mounted() {
    eventBus.$on(this.eventString, (getEventArg) => {
      this.isShow = true;
      this.$emit("getEventArg", getEventArg);
    });
  },
};
</script>



<style lang="scss" scoped>
</style>
